package dao;

import java.util.List;

import org.hibernate.Criteria;
import org.hibernate.criterion.Restrictions;

import entity.Material;

public class MaterialDAO extends BaseDAO{

	public MaterialDAO(){
		super(Material.class);
	}
	
	public Material findByNome(String nome){
		Criteria criteria = this.createCriteria();
		criteria.add(Restrictions.eq("material", nome));
		return (Material) criteria.uniqueResult();
	}
	
}
